<extend name="../layout" />

<block name="main_content">
    <div class="widget-box">
        <div class="widget-content nopadding">
            <table class="voucherListTable table table-bordered">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>日期</th>
                        <th>凭证字号</th>
                        <th>摘要</th>
                        <th>科目</th>
                        <th>借方金额</th>
                        <th>贷方金额</th>
                        <th>制单人</th>
                        <th>审核人</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <volist name="volist" id="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.date|toDate="Y-m-d"}</td>
                            <td>{$vo.mark_id|toTypeName}-{$vo.mark_num}</td>
                            <td>
                                <volist name="vo[AccountingVoucherDetail]" id="avd">
                                    <p>{$avd.summary}</p>
                                </volist>
                            </td>
                            <td>
                                <volist name="vo[AccountingVoucherDetail]" id="avd">
                                    <p>{$avd.subject_id|toAccountingSubjectName}</p>
                                </volist>
                            </td>
                            <td>
                                <volist name="vo[AccountingVoucherDetail]" id="avd">
                                    <if condition="$avd[dc] eq 0">
                                        <p>{$avd.amount}</p>
                                    <else />
                                        <p>&nbsp;</p>
                                    </if>
                                </volist>
                            </td>
                            <td>
                                <volist name="vo[AccountingVoucherDetail]" id="avd">
                                    <if condition="$avd[dc] eq 1">
                                        <p>{$avd.amount}</p>
                                    <else />
                                        <p>&nbsp;</p>
                                    </if>
                                </volist>
                            </td>
                            <td>{$vo.user_id|toTruename}</td>
                            <td>{$vo.user_id|toTruename}</td>
                            <td></td>
                        </tr>
                    </volist>
                </tbody>
                <tfoot>
                    <tr>
                        <td colspan="10"><div class="pagination alternate"><ul>{$pages}</ul></div></td>
                    </tr>
                </tfoot>
            </table>
        </div>
    </div>
</block>